/********************************************************************
 * Copyright (c) 2004 Ultimania Organization. 
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Eclipse Public License
 * v1.0 which accompanies this distribution, and is available at
 * http://www.eclipse.org/org/documents/epl-v10.html
 * 
 * Contributors:
 *     tidus - initial implementation. 
 *******************************************************************/

package org.ultimania.middlegenide.core;

import java.util.Properties;


public class SubPluginFactory {
    public static SubPlugin getSubPlugin(String name, Properties property){
    	try {
    		if(name.equals("hibernate")){
    			return new HibernateSubPlugin(property);
    		} else if(name.equals("ejb")){
    			return new EJBSubPlugin(property);
    		} else {
    			return null;
    		}
    	} catch (Throwable ex) {
    		ex.printStackTrace();
    	}
    	return null;
    }
}
